package com.lkd.controller;

import com.lkd.dto.UserLoginDto;
import com.lkd.mapper.UserMapper;
import com.lkd.service.UserService;
import com.lkd.vo.LoginUserVo;
import com.lkd.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

@Autowired
private UserService userService;
    @PostMapping("/api/user-service/user/login")
    public Result login(@RequestBody UserLoginDto userLoginDto){
        LoginUserVo login = userService.login(userLoginDto);
        return Result.success(login);
    }
}
